home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
graphics
/
qrt.lzh
/
LANGUAGE.DOC
< prev
next >
Wrap
Text File
|
1989-02-16
|
35KB
|
1,453 lines
QRT Language Reference
INTRODUCTION
This document is a reference guide to the QRT command language.
One section is devoted to each QRT command. All parameters to
commands are listed.
More information on QRT can be found in the User's Manual and
Technical Reference Manual.
The following table lists syntax used in this document:
TEXT MEANING EXAMPLE RANGE
(x,y,z) floating pt vector (10, -20, 30.56) all
(r,g,b) color value triple (0, .5, 1.00) 0 to 1
i an integer 12 0 to 127
n floating pt number -123.4 all
p positive float 123.4 >0
string text string FOO_BAR ASCII
Each section of this document contains one or more of the
following sub-sections:
QRT Ray Tracer Page 1 Language Reference
Command Type : OPTIONAL or REQUIRED
Parameters (required) : Lists required parameters
Parameters (optional) : Lists optional parameters
Optional Forms : Alternatives for parameter names. Ex:
'horiz' = 'horizon' means either can
be used as a parameter name.
Example : An example of the command (with all
required parameters, but not
necessarily all optional ones.
Restrictions : Things not to do
See also : Similar commands
QRT has a free format input language, and parameters can be given
in any order.
QRT Ray Tracer Page 2 Language Reference
QRT Misc. Setup Commands
SKY:
Command type: OPTIONAL
The SKY command is used to specify the color of all rays that
don't hit any other object. The sky is black by default. The
sky color at the zenith (up), and horizon can be specified,
and QRT will blend the colors in between as smoothly as
possible. In addition, dithering can be specified.
Parameters (optional):
zenith = (r,g,b) : the color of the zenith
horiz = (r,g,b) : the color at the horizon
dither = i : dithering
Optional forms:
'horiz' = 'horizon'
Example:
SKY ( horiz = (0, 0, .6),
zenith = (0, 0, .4),
dither = 5
)
See also : GROUND
GROUND:
Command type: OPTIONAL
QRT does not have a specific ground command. Instead, use a
large parallelogram with an optional pattern.
PARALLELOGRAM ( loc = (-10000, 0, -10000),
v1 = ( 20000, 0, 0),
v2 = ( 0, 0, 20000),
pattern = PATTERN_OF_CHOICE
)
See also : PARALLELOGRAM
QRT Ray Tracer Page 3 Language Reference
FOC_LENGTH:
Command type: OPTIONAL
This sets the focal length of QRT's "camera". The default is
50, but it can be changed with this command. As with 35mm
photography, larger numbers result in a 'telephoto' effect,
and smaller numbers will result in wide angle (and distorted)
views.
Example:
FOC_LENGTH = 70
Restrictions:
0 < FOC_LENGTH
FIRST_SCAN:
Command type: OPTIONAL
By default, QRT generates an image with the same resolution as
your screen. However, it can be instructed to create a
partial image by using this command and LAST_SCAN. This
feature may not be supported, depending on your QRT post
processor. First scan should be less than the Y resolution of
your screen.
Example:
FIRST_SCAN = 100
Restrictions:
0 < FIRST_SCAN < y-resolution
See also : LAST_SCAN
QRT Ray Tracer Page 4 Language Reference
LAST_SCAN:
Command type: OPTIONAL
This command is similar to FIRST_SCAN. LAST_SCAN should be
less than the Y resolution of your screen.
Example:
LAST_SCAN = 300
Restrictions:
0 < LAST_SCAN < y-resolution
See also : FIRST_SCAN
FILE_NAME:
Command type: REQUIRED
This is used to set the output file for QRT, which will be
read by the post processor. The file name will be mapped to
upper case. Some restrictions may arise from file naming
conventions on specific computers.
Example:
FILE_NAME = QRT_IMAGE.RAW
QRT Ray Tracer Page 5 Language Reference
OBSERVER:
Command type: REQUIRED
OBSERVER tells QRT where the observer is located, and his
direction of view. The view direction is specified by giving
the coordinates he should look at. In addition, the observer
UP vector may be given. This is, by default, (0,1,0).
Parameters (required):
loc = (x,y,z) : location of observer
lookat = (x,y,z) : point of interest
Parameters (optional):
up = (x,y,z) : up vector
Optional forms:
'loc' = 'pos' = 'location' = 'position'
Example:
OBSERVER ( loc = (0, 0, 0),
lookat = (100, 0, 0)
)
Restrictions:
The observer cannot look in the direction of the up
vector.
'lookat' cannot be equal to 'loc'.
'up' must have non-zero length.
QRT Ray Tracer Page 6 Language Reference
LAMP:
Command type: OPTIONAL
Lamps are sources of light in QRT. They can be placed
anywhere, and emit any color and intensity of light. The
ambient light value is the color of the lamp. The distance
parameter is the minimum distance from the lamp that objects
will be illuminated at full intensity. Most objects should